package com.hmy.finance.common.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.Getter;

/**
 * @author songkf
 */

@Getter
public enum StatementStatusEnum {
    //状态（0-未签署，1-已签署，9-已作废）
    NOT_SIGNED("0", "未签署", "primary"),
    SIGNED("1", "已签署", "success"),
    UN_NEED_SIGN("2", "无需签署", ""),
    CANCELLED("9", "已作废", "");
    @EnumValue
    private final String value;
    private final String desc;
    private final String cssTag;


     StatementStatusEnum(String value, String desc, String cssTag) {
        this.value = value;
        this.desc = desc;
        this.cssTag = cssTag;
    }

    public static String getDescByValue(String value) {
        for (StatementStatusEnum status : StatementStatusEnum.values()) {
            if (status.getValue().equals(value)) {
                return status.getDesc();
            }
        }
        return null;
    }
}
